package org.op.service;



public class WwDocumentInfo implements WwInfoObject {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1918450412758365095L;
	
	private String filepath; // path to the file[] object that this node represents
	private String name;
	
	public WwDocumentInfo(String id, String path) {
		filepath = path;
		name = id;
	}

	public String getFilepath() {
		return filepath;
	}

	public void setFilepath(String filepath) {
		this.filepath = filepath;
	}
	
	public String toString() {
		return name;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean equals (WwDocumentInfo docInfo) {
		boolean equals = false;
		if (docInfo.getName().equals(name) && (docInfo.getFilepath()==null || (docInfo.getFilepath().equals(filepath)))) {
			equals = true;
		}
		
		return equals;
	}
	
}
